body {
  margin: 0;
  padding: 0;
  background: #262626;
}

.loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 100px;
  text-transform: uppercase;
  line-height: 100px;
  text-align: center;
  color: #fff;
  font-size: 48px;
  letter-spacing: 15px;
  font-family: sans-serif;
  overflow: hidden;
}

.loader span {
  position: absolute;
  background: #fff;
}

.loader span:nth-child(1){
  width: 100%;
  height: 4px;
  top: 0;
  left: -100%;
  animation: animate1 2s linear infinite;
  animation-delay: 0s;
}

@keyframes animate1 {
  0% {
    left: -100%;
  }
  20% {
    left: 0;
  }
  40% {
    left: 100%;
  }
  60% {
    left: 100%;
  }
  80% {
    left: 100%;
  }
  100% {
    left: 100%;
  }
}

.loader span:nth-child(2){
  width: 4px;
  height: 100%;
  right: 0;
  top: -100%;
  animation: animate2 2s linear infinite;
  animation-delay: .5s;
}

@keyframes animate2 {
  0% {
    top: -100%;
  }
  20% {
    top: 0;
  }
  40% {
    top: 100%;
  }
  60% {
    top: 100%;
  }
  80% {
    top: 100%;
  }
  100% {
    top: 100%;
  }
}

.loader span:nth-child(3){
  width: 100%;
  height: 4px;
  bottom: 0;
  right: -100%;
  animation: animate3 2s linear infinite;
  animation-delay: 1s;
}

@keyframes animate3 {
  0% {
    right: -100%;
  }
  20% {
    right: 0;
  }
  40% {
    right: 100%;
  }
  60% {
    right: 100%;
  }
  80% {
    right: 100%;
  }
  100% {
    right: 100%;
  }
}

.loader span:nth-child(4){
  width: 4px;
  height: 100%;
  left: 0;
  bottom: -100%;
  animation: animate4 2s linear infinite;
  animation-delay: 1.5s;
}

@keyframes animate4 {
  0% {
    bottom: -100%;
  }
  20% {
    bottom: 0;
  }
  40% {
    bottom: 100%;
  }
  60% {
    bottom: 100%;
  }
  80% {
    bottom: 100%;
  }
  100% {
    bottom: 100%;
  }
}